package o;

import android.content.Context;
import android.util.Log;
import androidx.annotation.NonNull;
import o.yf.c;

public class yl implements yi {
    @NonNull
    public yf ˊ(@NonNull Context context, @NonNull c cVar) {
        Object obj = fo.ˏ(context, "android.permission.ACCESS_NETWORK_STATE") == 0 ? 1 : null;
        if (Log.isLoggable("ConnectivityMonitor", 3)) {
            String str;
            String str2 = "ConnectivityMonitor";
            if (obj != null) {
                str = "ACCESS_NETWORK_STATE permission granted, registering connectivity monitor";
            } else {
                str = "ACCESS_NETWORK_STATE permission missing, cannot register connectivity monitor";
            }
            Log.d(str2, str);
        }
        if (obj != null) {
            return new yk(context, cVar);
        }
        return new ys();
    }
}
